

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>常见问题 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/underscore.js"></script>
        <script src="../../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="认证和访问控制列表" href="../authentication/" />
    <link rel="prev" title="Ceph 对象网关的 S3 API" href="../" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../../">Ceph 对象网关</a> &raquo;</li>
        
          <li><a href="../">Ceph 对象网关的 S3 API</a> &raquo;</li>
        
      <li>常见问题</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../../_sources/radosgw/s3/commons.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../">
          

          
            
            <img src="../../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../">Ceph 对象网关</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../frontends/">HTTP 前端</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../placement/">存储池归置与存储类</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../multisite/">多站配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../multisite-sync-policy/">多站同步策略配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../pools/">存储池的配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../config-ref/">配置参考</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../admin/">管理指南</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../">S3 API</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="../#api">API</a><ul class="current">
<li class="toctree-l4 current"><a class="current reference internal" href="#">常见的</a></li>
<li class="toctree-l4"><a class="reference internal" href="../authentication/">认证</a></li>
<li class="toctree-l4"><a class="reference internal" href="../serviceops/">Service Ops</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bucketops/">Bucket Ops</a></li>
<li class="toctree-l4"><a class="reference internal" href="../objectops/">Object Ops</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cpp/">C++</a></li>
<li class="toctree-l4"><a class="reference internal" href="../csharp/">C#</a></li>
<li class="toctree-l4"><a class="reference internal" href="../java/">Java</a></li>
<li class="toctree-l4"><a class="reference internal" href="../perl/">Perl</a></li>
<li class="toctree-l4"><a class="reference internal" href="../php/">PHP</a></li>
<li class="toctree-l4"><a class="reference internal" href="../python/">Python</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ruby/">Ruby AWS::SDK Examples (aws-sdk gem ~&gt;2)</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ruby/#ruby-aws-s3-examples-aws-s3-gem">Ruby AWS::S3 Examples (aws-s3 gem)</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../#id1">功能支持情况</a></li>
<li class="toctree-l3"><a class="reference internal" href="../#header">不支持的 Header 字段</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../rgw-cache/">Data caching and CDN</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../swift/">Swift API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../adminops/">管理操作 API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../api/">Python 接口</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../nfs/">通过 NFS 导出</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../keystone/">与 OpenStack Keystone 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../barbican/">与 OpenStack Barbican 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../vault/">与 HashiCorp Vault 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../kmip/">KMIP Integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../opa/">与 Open Policy Agent 对接</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../multitenancy/">多租户</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../compression/">压缩</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../ldap-auth/">LDAP 认证</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../encryption/">服务器端加密</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../bucketpolicy/">桶策略</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../dynamicresharding/">动态的桶索引重分片</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mfa/">多因子认证</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../sync-modules/">同步模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../notifications/">Bucket Notifications</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../layout/">RADOS 中的数据布局</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../STS/">STS</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../STSLite/">STS Lite</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../keycloak/">Keycloak</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../role/">Role</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../session-tags/">Session Tags</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../orphans/">Orphan List and Associated Tooliing</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../oidc/">OpenID Connect Provider</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../troubleshooting/">故障排除</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../man/8/radosgw/">radosgw 手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../man/8/radosgw-admin/">radosgw-admin 手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../qat-accel/">使用 QAT 为加密和压缩提速</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../s3select/">S3-select</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lua-scripting/">Lua Scripting</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../d3n_datacache/">D3N Data Cache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../cloud-transition/">Cloud Transition</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="id1">
<h1>常见问题<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
</div>
<div class="section" id="id2">
<h2>桶和主机名<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<p>访问桶有两种不同的方法。第一种（首选的）方法把桶当作 URI 中的顶极目录。</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span><span class="n">mybucket</span> <span class="n">HTTP</span><span class="o">/</span><span class="mf">1.1</span>
<span class="n">Host</span><span class="p">:</span> <span class="n">cname</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">com</span>
</pre></div>
</div>
<p>第二种方法把桶当作虚拟主机名，例如：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span> <span class="n">HTTP</span><span class="o">/</span><span class="mf">1.1</span>
<span class="n">Host</span><span class="p">:</span> <span class="n">mybucket</span><span class="o">.</span><span class="n">cname</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">com</span>
</pre></div>
</div>
<p>要配置支持虚拟主机的桶，你可以在 ceph.conf 里设置 <code class="docutils literal notranslate"><span class="pre">rgw_dns_name</span> <span class="pre">=</span> <span class="pre">cname.domain.com</span></code> ，
或者把 <code class="docutils literal notranslate"><span class="pre">cname.domain.com</span></code> 加进域组配置的 <code class="docutils literal notranslate"><span class="pre">hostnames</span></code> 里面。
域组的配置请参考 <a class="reference external" href="../../multisite">Ceph 对象网关——多站配置</a>。</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>我们倾向于第一个方法，因为第二个涉及到繁重的域认证和 DNS 通配符。</p>
</div>
</div>
<div class="section" id="id3">
<h2>常见请求头<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 32%" />
<col style="width: 68%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>请求头</p></th>
<th class="head"><p>描述</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">CONTENT_LENGTH</span></code></p></td>
<td><p>Length of the request body.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">DATE</span></code></p></td>
<td><p>Request time and date (in UTC).</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">HOST</span></code></p></td>
<td><p>The name of the host server.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">AUTHORIZATION</span></code></p></td>
<td><p>Authorization token.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id4">
<h2>常见响应状态<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 30%" />
<col style="width: 70%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>HTTP 状态</p></th>
<th class="head"><p>响应代码</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">100</span></code></p></td>
<td><p>Continue</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">200</span></code></p></td>
<td><p>Success</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">201</span></code></p></td>
<td><p>Created</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">202</span></code></p></td>
<td><p>Accepted</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">204</span></code></p></td>
<td><p>NoContent</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">206</span></code></p></td>
<td><p>Partial content</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">304</span></code></p></td>
<td><p>NotModified</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>InvalidArgument</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>InvalidDigest</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>BadDigest</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>InvalidBucketName</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>InvalidObjectName</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>UnresolvableGrantByEmailAddress</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>InvalidPart</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>InvalidPartOrder</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>RequestTimeout</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">400</span></code></p></td>
<td><p>EntityTooLarge</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">403</span></code></p></td>
<td><p>AccessDenied</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">403</span></code></p></td>
<td><p>UserSuspended</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">403</span></code></p></td>
<td><p>RequestTimeTooSkewed</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">404</span></code></p></td>
<td><p>NoSuchKey</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">404</span></code></p></td>
<td><p>NoSuchBucket</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">404</span></code></p></td>
<td><p>NoSuchUpload</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">405</span></code></p></td>
<td><p>MethodNotAllowed</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">408</span></code></p></td>
<td><p>RequestTimeout</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">409</span></code></p></td>
<td><p>BucketAlreadyExists</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">409</span></code></p></td>
<td><p>BucketNotEmpty</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">411</span></code></p></td>
<td><p>MissingContentLength</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">412</span></code></p></td>
<td><p>PreconditionFailed</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">416</span></code></p></td>
<td><p>InvalidRange</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">422</span></code></p></td>
<td><p>UnprocessableEntity</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">500</span></code></p></td>
<td><p>InternalError</p></td>
</tr>
</tbody>
</table>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../authentication/" class="btn btn-neutral float-right" title="认证和访问控制列表" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../" class="btn btn-neutral float-left" title="Ceph 对象网关的 S3 API" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>